package com.molichuxing.gateway.bff.advertising.services.impl;

import com.molichuxing.gateway.bff.advertising.convertor.Convert;
import com.molichuxing.gateway.bff.advertising.response.AdvertisingInfoVo;
import com.molichuxing.gateway.bff.advertising.services.AdvertisingBffService;
import com.molichuxing.services.infrastructure.dto.response.AdvertisingInfoDto;
import com.molichuxing.services.infrastructure.service.AdvertisingInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: renzhengyu
 * @Description:
 * @Date: Created in 11:45 2019/10/30
 * @Modified By:
 **/
@Service("advertisingBffService")
public class AdvertisingBffServiceImpl implements AdvertisingBffService {


    @Resource
    private AdvertisingInfoService advertisingInfoService;

    @Override
    public List<AdvertisingInfoVo> getAdvertisingInfoVoList(Integer storeId) {

        List<AdvertisingInfoDto> dtoList = advertisingInfoService.getAdvertisingInfoDto(storeId);

        return Convert.toAdvertisingInfoVo(dtoList);
    }
}
